import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/admin/login/logon',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/admin/login/logOut',
    method: 'get'
  })
}

// 用户注册获取角色分类
export function selectRole() {
  return request({
    url: '/admin/login/selectRole',
    method: 'get',
  })
}

// 用户注册
export function sign(params) {
  return request({
    url: '/admin/login/sign',
    method: 'post',
    params
  })
}

// 通过邮箱找回密码
export function forgetPassword(params) {
  return request({
    url: '/admin/login/forgetPassword',
    method: 'get',
    params
  })
}

// 邮箱找回密码表单数据处理
export function retrievePassword(params) {
  return request({
    url: '/admin/login/retrievePassword',
    method: 'get',
    params
  })
}
